# from utils.response import ResponsePackaging
#
#
# def verify(view):
#     def wrapper(func):
#         def inner_wrapper(*args, **kwargs):
#             request = args[1]
#             if request.user:
#                 user = request.user
#                 for i in user.permission.all():
#                     getattr(i.codename, view)
#                 if user.has_perm(view):
#                     return func(*args, **kwargs)
#                 else:
#                     return ResponsePackaging(403, None, '暂无权限，请联系管理员添加！')
#             return False
#         return inner_wrapper
#
#     return wrapper
